package top.songxs.gmall.feign.cart.fallback;

import lombok.extern.slf4j.Slf4j;
import top.songxs.gmall.cart.entity.CartItem;
import top.songxs.gmall.cart.vo.AddCartSuccessVo;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.common.result.ResultCodeEnum;
import top.songxs.gmall.feign.cart.CartRpcFeignClient;

import java.util.List;

@Slf4j
public class CartRpcFeignFallback implements CartRpcFeignClient {
    @Override
    public Result<AddCartSuccessVo> addCart(Long skuId, Integer skuNum) {
        log.error("addCart 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

    @Override
    public Result deleteChecked() {
        log.error("deleteChecked 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }

    @Override
    public Result<List<CartItem>> findAllCheckedCartItem() {
        log.error("findAllCheckedCartItem 兜底方案执行了");
        return Result.build(null, ResultCodeEnum.SUCCESS);
    }
}
